<?php require VIEW_PATH."/header.php";?>
<body>
<link rel="stylesheet" href="Public/org/kindeditor/themes/default/default.css" />
<script src="Public/org/kindeditor/kindeditor.js"></script>
<script src="Public/org/kindeditor/lang/zh_CN.js"></script>
<script src="{{__VIEW__}}/Goods/js.js" type="text/javascript"></script>
<link rel="stylesheet" href="{{__VIEW__}}/Goods/css.css">
	<form method="post" enctype="multipart/form-data">

    <div class="hd-tab">
      <ul class="hd-tab-menu">
        <li lab="base" class="active">
          <a> 基本设置 </a>
        </li>
        <li lab="pics">
          <a>商品图集 </a>
        </li>
        <li lab="attribute">
          <a>商品属性</a>
        </li>
        <li lab="service">
          <a>商品详情</a>
        </li>
      </ul>
      <div class="hd-tab-content">
        <div lab="base" class="hd-tab-area">
          <table class="hd-table hd-table-form hd-form">
            <thead>
              <tr>
                <td colspan="2">添加商品</td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <th>父级</th>
                <td>
                 <select name="cat_id">
                   {{foreach from="$catData" value="$v"}}
                   <option value="{{$v['cat_id']}}">{{$v['_name']}}</option>
                   {{endforeach}}
                 </select>
               </td>
             </tr>
             <tr>
              <th>商品名称</th>
              <td>
                <input type="text" name="goods_name" class="hd-w300">
              </td>
            </tr>
            <tr>
              <th>货号</th>
              <td>
                <input type="text" name="goods_sn" class="hd-w300">
              </td>
            </tr>
            <tr>
              <th>单位</th>
              <td>
                <input type="text" name="unit" class="hd-w300">
              </td>
            </tr>
            <tr>
              <th>品牌</th>
              <td>
               <select name="brand_id">
                 {{foreach from="$brandData" value="$v"}}
                 <option value="{{$v['id']}}">{{$v['name']}}</option>
                 {{endforeach}}
               </select>
             </td>
           </tr>
         </tr>
         <tr>
          <th>点击数</th>
          <td>
            <input type="text" name="click" class="hd-w300">
          </td>
        </tr>
        <tr>
          <th>列表页图</th>
          <td>
            <input type="file" name="list_pic" class="hd-w300">
          </td>
        </tr>
        <tr>
          <th>缩略图</th>
          <td>
            <input type="file" name="thumb_pic" class="hd-w300">
          </td>
        </tr>
        <tr>
          <th>栏目关键词</th>
          <td>
            <input type="text" name="keyword" class="hd-w300">
          </td>
        </tr>
        <tr>
          <th>栏目描述</th>
          <td>
            <textarea name="description" class="hd-w300 hd-h100"></textarea>
          </td>
        </tr>
        
      </tbody>
    </table>
  </div>
  <!-- 图集 -->
  <div lab="pics" class="hd-tab-area">
    <table id="pics">
      <tr>
        <td>
          <input type="file" name="pics[]"><span onclick="addPic(this)">[+]</span>
        </td>
      </tr>
    </table>
  </div>
  <!-- end图集 -->


  <!-- 商品属性 -->
  <div lab="attribute" class="hd-tab-area">
    <table class="hd-table hd-table-form hd-form">
      <tr>
        <td>选择商品类型</td>
        <td>
          <select name="type_id" onchange="getAttrList()">
            <option value="">==选择类型==</option>
            {{foreach from="$shopType" value="$v"}}
             <option value="{{$v['id']}}">{{$v['type_name']}}</option>
            {{endforeach}}
          </select>
        </td>
      </tr>
      <tr>
        <td colspan="2">
          <table class="hd-table hd-table-form hd-form" id="attr_list">
            
          </table>
        </td>
      </tr>
    </table>
  </div>
  <!-- end商品属性 -->


  <!-- 服务 -->
  <div lab="service" class="hd-tab-area">
    <table class="hd-table hd-table-form hd-form">
      <tr>
        <th class="hd-w100">商品详情</th>
        <td>
          <textarea id="content" name="content" style="width:700px;height:300px;"></textarea>
          <script>
            KindEditor.ready(function(K) {
                    window.editor = K.create('#content');
            });
          </script>
        </td>
      </tr>
      <tr>
        <th>售后服务</th>
        <td>
          <textarea id="service" name="service" style="width:700px;height:300px;"></textarea>
          <script>
            KindEditor.ready(function(K) {
                    window.editor = K.create('#service');
            });
          </script>
        </td>
      </tr>
    </table>
  </div>
  <!-- end服务 -->
</div>
<button class="hd-btn hd-btn-primary">提交</button>
</div>

</form>

</body>
</html>











